package com.yh.entity;

import java.util.List;

public class PageBean<T> {
    //总记录数
	private int totalCount;
   //总页数
	private int totalPage;
  //当前页
	private int pageCode;
 //每页显示的记录数
	private static int pageSize=2;
    
	private List<T> beanList;
	
	public int getTotalPage(){
		if(totalCount % pageSize == 0){
			return  totalCount / pageSize;
		}else{
			return totalCount / pageSize+1;
		}
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getPageCode() {
		return pageCode;
	}

	public void setPageCode(int pageCode) {
		this.pageCode = pageCode;
	}

	public static int getPageSize() {
		return pageSize;
	}

	public static void setPageSize(int pageSize) {
		PageBean.pageSize = pageSize;
	}

	public List<T> getBeanList() {
		return beanList;
	}

	public void setBeanList(List<T> beanList) {
		this.beanList = beanList;
	}
	
	
}
